package main

import "fmt"

func main() {
	ch := make(chan int)

	//双向channel能隐式转换成单向channel
	var writeChan chan<- int = ch
	writeChan <- 666
	var b = <-writeChan //报错
	fmt.Println(b)

	var readChan <-chan int = ch
	readChan <- 10 //报错
}
